<?php

namespace App\Http\Controllers\home;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Cache;
use Barryvdh\Debugbar\Facades\Debugbar;

class IndexController extends Controller
{
    //使用文件缓存
    public function index()
    {
        //缓存存储
        //Cache::put('name','zhangming1',1);
        Cache::put(['name'=>'jaaaaa','age'=>'21'],2);
        //return Cache::get('name');
        //缓存获取数据
        //Cache::get('name');
        //清空缓存
        //Cache::flush();
        //清空某个数据
       // Cache::forget('name');
        //永久缓存
        //Cache::forever('name','forever');
        //键值对存储
     //   cache(['name'=>'wbc'],1);
    }
}
